home *** CD-ROM | disk | FTP | other *** search
- >I think this problem could be solved quite simply by using one of the reserved
- >fields in the GEMDOS executable program header. One of these fields could be
- >used for telling the OS that it does not have to clear the TPA beforeexecuting
-
- Half of this conversation is silly. Since when is clearing memory
- slow? A properly written memory-set/clear function will use, say, 12 or 13
- registers filled with the pattern and then loop on movem.l instruction.
-
- Needless to say, this is *fast*. Very fast, in fact.
-
- And before some of the less sophisticated start blabbering about
- special cases, following is some *GENERAL* 68K code for clearing, moving,
- and comparing memory.
-
- All routines work on arbitrary boundries, and optimize according to
- the block size and alignment, all the way to using multiple-register moves
- to accomplish the goal. bmov() will do either an ascending or decending
- copy accordingly, allowing for overlapped moves.
-
- SPECIAL NOTES:
- -All calls take 32 bit quantities for any pointers or integers. Note
- -especially that the BSET() function takes a long for the fill
- character even though only a char is used. Simply modify the code
- to fill your needs.
-
- -This assembles under the Aztec assembler. Some modifications may
- be required to work on other assemblers. However, the code is
- COMPLETELY self contained.
-
- -Code is set up for being called from C, with arguments pushed on
- the stack in reverse argument (i.e. first arg is 4(sp), second is
- 8(sp), and third is 12(sp) on entry to the call)
-
- -D0/D1/A0/A1 are all assumed to be scratch and are not saved.
-
- -Matt
-
-